// $Id: loggerfailurereason.h 72 2004-12-02 15:03:28Z jonas $
#ifndef LOGGERFAILUREREASON_H
#define LOGGERFAILUREREASON_H

#include "loggercount.h"
#include "eos.h"
#include <fstream>

/**
 * Log the reason of failure on request and inersts.
 */
class LoggerFailureReason : public Logger {
public:
	LoggerFailureReason();
	void eos_simulate_start(void *);
	void eos_simulate_stop(void *);
	void clock_tick(unsigned int);
	void node_routeFile(void *, void *, void *, unsigned char);

private:
	Eos *m_eos;
	std::fstream m_fout;

	int m_requestFailedCount;
	int m_requestSuccededCount;

	int m_requestFailedReason[4];
	int m_requestSuccededReason[4];
	int m_requestUnknownReason[4];

	void resetAll();
	void saveRequest(int*);
};

#endif
